<div id="sidebar">
  <h1><?php echo $text_helper->translate('Tasks', array()); ?>:</h1>
  <ul>
    <li><?php   echo  $url_helper->link_to($text_helper->translate('Create new User'), array('action' => 'add'))?></li>
  </ul> 
</div>

<div id="content">
  <h1><?php echo $text_helper->translate('Users', array()); ?></h1>

  <?php if(!empty($users)) { ?>
  <div class="listing">
  <table cellspacing="0" summary="<?php echo $text_helper->translate('Listing available Users', array()); ?>">

  <tr>
    <?php   $content_columns = array_keys($User->getContentColumns()); ?>
    <?php 
 empty($content_columns) ? null : $content_column_loop_counter = 0;
 empty($content_columns) ? null : $content_columns_available = count($content_columns);
 if(!empty($content_columns))
     foreach ($content_columns as $content_column_loop_key=>$content_column){
         $content_column_loop_counter++;
         $content_column_is_first = $content_column_loop_counter === 1;
         $content_column_is_last = $content_column_loop_counter === $content_columns_available;
         $content_column_odd_position = $content_column_loop_counter%2;
?>
        <th scope="col"><?php   echo  $pagination_helper->sortable_link($content_column) ?></th>
    <?php } ?>
    <th colspan="3" scope="col"><span class="auraltext"><?php echo $text_helper->translate('Item actions', array()); ?></span></th>
  </tr>

  <?php 
 empty($users) ? null : $user_loop_counter = 0;
 empty($users) ? null : $users_available = count($users);
 if(!empty($users))
     foreach ($users as $user_loop_key=>$user){
         $user_loop_counter++;
         $user_is_first = $user_loop_counter === 1;
         $user_is_last = $user_loop_counter === $users_available;
         $user_odd_position = $user_loop_counter%2;
?>
    <tr <?php if(!empty($user_odd_position)) { ?>class="odd"<?php } ?>>
    <?php 
 empty($content_columns) ? null : $content_column_loop_counter = 0;
 empty($content_columns) ? null : $content_columns_available = count($content_columns);
 if(!empty($content_columns))
     foreach ($content_columns as $content_column_loop_key=>$content_column){
         $content_column_loop_counter++;
         $content_column_is_first = $content_column_loop_counter === 1;
         $content_column_is_last = $content_column_loop_counter === $content_columns_available;
         $content_column_odd_position = $content_column_loop_counter%2;
?>
      <td class="field"><?php   echo  $user->get($content_column) ?></td>
    <?php } ?>
      <td class="operation"><?php   echo  $users_helper->link_to_show($user)?></td>
      <td class="operation"><?php   echo  $users_helper->link_to_edit($user)?></td>
      <td class="operation"><?php   echo  $users_helper->link_to_destroy($user)?></td>    
    </tr>
  <?php } ?>
   </table>
  </div>
  <?php } ?>
  
    <?php if(!empty($user_pages->links)) { ?>
        <div id="UserPagination">
        <div id="paginationHeader"><?php   echo translate('Showing page %page of %number_of_pages',array('%page'=>$user_pages->getCurrentPage(),'%number_of_pages'=>$user_pages->pages))?></div>
        <?php echo empty($user_pages->links) ? '' : $user_pages->links; ?>
        </div>
    <?php } ?>
  
</div>